<?php

//////////////////////////////////////////////////
//			Xtra Forum Software                           //
//			      Version 0.2.0                                   //
//		 -----------------------------------------	          //
//               Copyright 2008, Xtra Forum Software           //
//	        http://www.xtraforumsoftware.us.to/           //
/////////////////////////////////////////////////

?>

<?php

function Template_Main_Categories()
{
	global $db_prefix, $category, $context;
	// Show the forum categories
	$result = mysql_query("SELECT * FROM " .$db_prefix. "categories, " .$db_prefix. "forums ORDER BY " .$db_prefix. "categories.cat_order, " .$db_prefix. "forums");
	while($row = mysql_fetch_array( $result ))
	{
		echo '<div class="Forum_Categories">
				<table border="1" width="100%">
					<tr>
						<th colspan="4" class="Table_Header">', $row['name'], '</th>
					</tr>
					<tr>
						<th>Board</th><th>Topics</th><th>Posts</th><th>Last Post</th>
					</tr>
				</table>
			</div>';
	}
}

function Template_Main_Stats()
{
	// Show the awesome forum statistics BOOYA!
	echo '<br />
		<div class="Stats">
			<table border="1" width="100%">
				<tr>
					<th colspan="2" class="Table_Header">Statistics</th>
				</tr>
				<tr>
					<th colspan="2" class="Table_Header">Recent Posts</th>
				</tr>
				<tr>
					<td class="windowbg">Image Here</td><td class="windowbg2">Recent Posts Here</td>
				</tr>
				<tr>
					<th colspan="2" class="Table_Header">Active Users</th>
				</tr>
				<tr>
					<td class="windowbg">Image Here</td>
					<td class="windowbg2">
						?? users in the past ?? minutes (?? guests, ?? members, ?? anonymous users)<br />
						<hr />
						Users List Here<br />
						<hr />
						Most users online today were ??. Most users ever online was ?? on ?? ?, ??, ?:?? ??<br />
						<hr />
						<b>Forum Legend: </b>
					</td>
				</tr>
				<tr>
					<th colspan="2" class="Table_Header">Board Stats</th>
				</tr>
				<tr>
					<td class="windowbg">Image Here</td><td class="windowbg2">Total Posts:<br />Total Topics:<br />Registered Members:<br />Welcome to our Newest Member, </td>
				</tr>
			</table>
		</div>';
}

function Show_Login()
{
	global $action; // Include da globals!
	// Show the login form
	echo '<table border="1" width="100%">
			<tr>
				<th colspan="2" class="Table_Header">Login</th>
			</tr>
			<form action="index.php?action=Login2" method="post">
			<tr>
				<td>
					Username:
				</td>
				<td>
					<input type="text" name="username" />
				</td>
			</tr>
			<tr>
				<td>
					Password:
				</td>
				<td>
					<input type="password" name="password" />
				</td>
			</tr>
			<tr>
				<td colspan="2"><center><input type="submit" value="Login" /></center></td>
			</tr>
			</form>
		</table><br />
		<center>I Forgot My Password</center>';
}

function Show_Register()
{
	global $action; // Include the globals
	// Show the register fields...
	echo '<table border="1" width="100%">
			<tr>
				<th colspan="2" class="Table_Header">Registration</th>
			</tr>
			<form action="index.php?action=Register2" method="post">
			<tr>
				<td>
					Username:<br />
					<small>Enter your desired Username.<br />Can not be longer than 20 characters.</small>
				</td>
				<td>
					<input type="text" name="username" />
				</td>
			</tr>
			<tr>
				<td>
					Password:<br />
					<small>Please enter a password for your user account.<br />Can not be longer than 30 characters.</small>
				</td>
				<td>
					<input type="password" name="password" />
				</td>
			</tr>
			<tr>
				<td>
					Confirm Password:<br />
					<small>Please enter your password again.</small>
				</td>
				<td>
					<input type="password" name="confirm_password" />
				</td>
			</tr>
			<tr>
				<td>
					Email Address:<br />
					<small>Please enter a valid email address for your account.</small>
				</td>
				<td>
					<input type="text" name="email_address" />
				</td>
			</tr>
			<tr>
				<td colspan="2">
					<center><b>Registration Terms & Rules</b></center><br />
						TO BE WRITTEN<br />
					<center><input type="checkbox" name="terms_agree" value="1" /> I Agree</center>
				</td>
			</tr>
			<tr>
				<td colspan="2"><center><input type="submit" value="Register" /></center></td>
			</tr>
			</form>
		</table>
		';
}

?>